'SELECT("Component type to reference"+CHR(10)+"Resistances"+CHR(10)+"Capacitors"+CHR(10)+"Diodes"+CHR(10)+"Transistors"+CHR(10)+"Integrated circuits"+CHR(10)+"All the components"+CHR(10)+"Specific Components")'
'ASK("What is the name of"+CHR(10)+"the components to reference?"+CHR(10)+"You can use the generic"+CHR(10)+"chars (#?) for a"+CHR(10)+"larger selection")'
type=result
if type='' then exit
'ASK("What is the reference"+CHR(10)+"for these components?")'
reference=result
if reference='' then exit
end
otherwise exit
end
'N=FIRSTSEL'; obj=result
if obj>0 then do
'REQUEST("Do you want to reference"+CHR(10)+"only the selected"+CHR(10)+"components?"+CHR(10)+"If you choose NO the"+CHR(10)+"operation will be done"+CHR(10)+"for every component"+CHR(10)+"on the document.")'
choix=result
end
else choix=0
'SAVEALL(-1)'
call marquer_composant(reference,type,choix)
exit
marquer_composant: procedure
parse arg reference,type,selection
if selection<=0 then do
/* Annulation du marquage éventuel */
'UNMARK(-1)'
/* Marquage et comptage des éléments à référencer */